#pragma once
#include "object_builder.hpp"

class mallet {
	float _radius;
	float _height;
	generated_data *_generated;

public:
	mallet(float radius, float height, int numpoint_aroundpuck) {
		_radius = radius;
		_height = height;
		_generated = object_builder::createmallet(point(0.0f, 0.0f, 0.0f), radius, height, numpoint_aroundpuck);
		logv("a new mallet is here, radius:%f, height:%f", _radius, _height);
	}

	~mallet() {
		delete _generated;
	}

	void
	binddata() {
		glEnableVertexAttribArray(0);
		glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, _generated->vertices);
	}
	
	void 
	draw() {
		_generated->draw();
	}

	float
	getheight() {
		return _height;
	}
};